/*
 * @Description: cookies存取模块
 * @Author: yue
 * @Date: 2022-08-29 19:02:46
 * @LastEditors: yue
 * @LastEditTime: 2022-08-29 21:31:54
 */

import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token'
const TokenTime = 'hrsaas-timestamp-key'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getTokenTime() {
  return Cookies.get(TokenTime)
}

export function setTokenTime() {
  return Cookies.set(TokenTime, Date.now())
}
